package material.command.receiver_命令接收者;

public class Stereo {
    private String location;//音响位置

    public Stereo(String location) {
        this.location = location;
    }

    public void on() {//开
        System.out.println(location + " stereo is on");
    }

    public void off() {//关
        System.out.println(location + " stereo is off");
    }

    public void setCD() {//设置播放的音乐为CD输入源
        System.out.println(location + " stereo is set for CD input");
    }

    public void setDVD() {//设置播放的音乐为DVD输入源
        System.out.println(location + " stereo is set for DVD input");
    }

    public void setRadio() {//设置立体声
        System.out.println(location + " stereo is set for Radio");
    }

    public void setVolume(int volume) {//设置音量
        // code to set the volume
        // valid range: 1-11 (after all 11 is better than 10, right?)
        System.out.println(" stereo volume set to " + volume);
    }
}
